[#macro nav index]
<nav class="navbar navbar-fixed-top navbar-inverse">
	<div class="container">
		<div class="navbar-header">
			<button type="button" class="navbar-toggle collapsed"
				data-toggle="collapse" data-target="#navbar" aria-expanded="false"
				aria-controls="navbar">
				<span class="sr-only">Toggle navigation</span> <span
					class="icon-bar"></span> <span class="icon-bar"></span> <span
					class="icon-bar"></span>
			</button>
			<a class="navbar-brand" href="${siteurl}index.htm">爱玩社区</a>
		</div>
		<div id="navbar" class="collapse navbar-collapse">
			<ul class="nav navbar-nav">
				<li [#if index==1] class="active" [/#if]><a href="${siteurl}index.htm">首页</a></li>
				<li [#if index==2] class="active" [/#if]><a href="${siteurl}article/index.htm">文章</a></li>
				<li [#if index==5] class="active" [/#if]><a href="${siteurl}activity/index.htm">相片</a></li>
				<li [#if index==3] class="active" [/#if]><a href="${siteurl}question/index.htm">问答</a></li>
				<li [#if index==4] class="active" [/#if]><a href="${siteurl}activity/index.htm">活动</a></li>
			</ul>
			[@shiro.guest]
			<ul class="nav navbar-nav navbar-right">
				<li><a href="${siteurl}login.htm">登陆</a></li>
				<li><a href="${siteurl}register.htm">注册</a></li>
			</ul>
			[/@shiro.guest] [@shiro.authenticated]
			<ul class="nav navbar-nav navbar-right">
				<li class="dropdown closed"><a aria-expanded="true"
					aria-haspopup="true" role="button" data-toggle="dropdown"
					class="dropdown-toggle glyphicon " href="#"> <span
						class="glyphicon glyphicon-user"></span> 个人中心 <span class="caret"></span>
				</a>
					<ul class="dropdown-menu">
						<li><a href="#"><span style="font-size: 20px;"
								class="glyphicon glyphicon-home"></span>个人资料</a></li>
						<li><a href="#"><span
								class="glyphicon glyphicon-question-sign"></span>我的问答</a></li>
						<li><a href="#"><span
								class="glyphicon glyphicon-question-sign" />我的文章</a></li>
						<li class="divider" role="separator"></li>
						<li class="dropdown-header">其他</li>
						<li><a href="#">客服中心</a></li>
						<li><a href="${siteurl}logout.htm">退出</a></li>
					</ul></li>
			</ul>
			[/@shiro.authenticated]
			<form class="navbar-form navbar-right">
				<input type="text" class="form-control" placeholder="搜索...">
			</form>
		</div>
		<!-- /.nav-collapse -->
	</div>
	<!-- /.container -->
</nav>
[/#macro]